﻿<phone:PhoneApplicationPage
    x:Class="TestPhone.PlayerPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="Landscape"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="Transparent" Loaded="LayoutRoot_Loaded" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <MediaElement  Name="MyPlayer" MediaFailed="MyPlayer_MediaFailed" MediaOpened="MyPlayer_MediaOpened" MediaEnded="MyPlayer_MediaEnded"   IsHitTestVisible="False" Stretch="Uniform" MarkerReached="MyPlayer_MarkerReached" Grid.RowSpan="3"/>
        <Grid Grid.RowSpan="1" Grid.Row="1" Tap="Rectangle_Tap" Background="Transparent">
           
            <TextBlock Name="txtSubtitleBack" HorizontalAlignment="Center" IsHitTestVisible="False" FontWeight="Bold" Grid.RowSpan="2" FontSize="30" Foreground="Black"  VerticalAlignment="Bottom" Margin="0,20" TextAlignment="Center" Visibility="Visible"/>
            <TextBlock Name="txtSubtitle" HorizontalAlignment="Center" FontSize="30"  VerticalAlignment="Bottom" Margin="0,20" TextAlignment="Center" Visibility="Visible" IsHitTestVisible="False"/>
        </Grid>
        <Grid Height="80" Grid.Row="0" Name="HeadGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Rectangle IsHitTestVisible="False" Grid.ColumnSpan="2" Stroke="Black" Opacity="0.245">
                <Rectangle.Fill>
                    <SolidColorBrush Color="{StaticResource PhoneTextBoxColor}"/>
                </Rectangle.Fill>
            </Rectangle>
            <ScrollViewer>
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Name="txtTitle" FontSize="32"/>
            </ScrollViewer>
            <Image Name="btnPlay" Source="Play button.png" Tap="btnPlay_Tap" Grid.Column="1" Height="80" Width="80"/>
        </Grid>
        <Grid Grid.Row="2" Name="ControlGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="200"/>
                <!--<ColumnDefinition Width="Auto"/>-->
            </Grid.ColumnDefinitions>
            <Rectangle IsHitTestVisible="False" Grid.ColumnSpan="1" Stroke="Black" Opacity="0.6">
                <Rectangle.Fill>
                    <SolidColorBrush Color="#BF000000"/>
                </Rectangle.Fill>
            </Rectangle>
            <Slider Grid.Column="0" Name="SeekProgress"  HorizontalAlignment="Stretch" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,10" ValueChanged="SeekProgress_ValueChanged" Style="{StaticResource SliderStyle1}" CacheMode="BitmapCache"></Slider>
            <TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Text="0:00:00 / 0:00:00" Margin="15" Name="txtTimePosition"/>
            <Rectangle Grid.Column="1" Tap="Menu_Tap" Stroke="Black" Fill="Gray" Opacity="0.25"/>
            <TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Menu" VerticalAlignment="Bottom" Grid.Column="1" FontSize="40" IsHitTestVisible="False" Margin="0,0,10,10"/>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Memory:" Name="txtMem" VerticalAlignment="Top" Grid.Column="1" FontSize="24" IsHitTestVisible="False" Margin="0,0,10,10"/>
        </Grid>
        <Grid Grid.Row="3" Visibility="Collapsed" Name="SettingGrid">
            <phone:Pivot Name="SettingPivot">
            	<phone:PivotItem x:Name="SubSetting" Header="字幕选择">
            		<Grid/>
            	</phone:PivotItem>
            	<phone:PivotItem x:Name="TrackSetting" Header="音轨选择">
            		<Grid/>
            	</phone:PivotItem>
                <phone:PivotItem x:Name="PlaySetting" Header="其它设置">
            		<Grid/>
            	</phone:PivotItem>
            </phone:Pivot>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>